﻿using Cofe.Core;
using Cofe.Core.Dynamic;
using Cofe.Core.Implements;
using Cofe.Core.Interfaces;
using Cofe.Core.Property;
using Cofe.IO;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Runtime.Serialization;
using System.Xml.Serialization;

namespace Cofe.IO.Implements
{
#if UseDataContractToSerialize
    [DataContract(Name="Directory", Namespace=CofeConstants.Namespace)]
#else
    [XmlRoot(ElementName = "Directory", Namespace = CofeConstants.Namespace)]
#endif
    public class DirectoryInfo : CofeDirectoryInfo, IDirectoryInfo
    {
        #region Constructor

        void init(IPropertyHost properties)
        {
            //FileAttributes = (FileAttributes)GetProperty(FileSystemInfoProperties.FileAttributes).Value;
        }


        public DirectoryInfo(IPropertyHost properties, IDynamicPropertyInterfaceProvider[] providers)
            : base(properties, providers)
        {
            init(properties);
        }

        public DirectoryInfo(IPropertyHost properties)
            : base(properties)
        {
            init(properties);
        }

        protected DirectoryInfo()
            : base()
        {

        }


        #endregion

        #region Methods



        #endregion

        #region Data

        #endregion

        #region Public Properties

        public override string Type
        {
            get { return FileTypes.Folder; }
            protected set { base.Type = value; } 
        }

        //public FileAttributes FileAttributes { get; private set; }

        //public bool IsFileSystem
        //{
        //    get { throw new NotImplementedException(); }
        //}

        //public DateTime CreationTimeUtc { get { return GetProperty(FileSystemInfoProperties.CreationTimeUtc).ValueAsUtcDateTime; } }
        //public DateTime CreationTime { get { return GetProperty(FileSystemInfoProperties.CreationTimeUtc).ValueAsLocalDateTime; } }


        #endregion


    }
}
